﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Wjtour.Common;
using Hjp.FrameWork.Common;
using Wjtour.BLL;
using System.Linq;

namespace Wjtour.Web.Front
{
    public partial class travelhoteldetail : BasePage
    {
        protected int id = 1;
        hotel_bll _bll = new hotel_bll();
        protected Wjtour.Domain.hotel data = new Domain.hotel();
        protected List<Wjtour.Domain.hotel> recommendHotels = new List<Domain.hotel>();
        protected List<Wjtour.Domain.scene> recommendScenes = new List<Domain.scene>();
        scene_bll _scenebll = new scene_bll();


        protected List<Wjtour.Domain.article> trafficGuides = new List<Domain.article>();//旅游攻略
        Wjtour.BLL.article_bll _articleBll = new article_bll();

        protected void Page_Load(object sender, EventArgs e)
        {
            id = Utils.StrToInt(Request["id"], 1);
            bindList();
        }

        void bindList()
        {
            data = _bll.Load(id);

            recommendHotels = _bll.GetAll<Wjtour.Domain.hotel>("select top 4 * from hotel where isrecommend =1 order by id desc").ToList();
            recommendScenes = _scenebll.GetAll<Wjtour.Domain.scene>("select top 7 * from scene where isrecommend = 1 order by id desc").ToList();
            trafficGuides = _articleBll.GetAuditTopListWithFirstLogo("6", 7, 2);
        }
    }
}
